/*
 * @Author: Oscar Pena
 * 
 * */
package FlowGram.Application.SimulatorWindow.TerrainEditor;

public abstract class MapObject {
	private int positionX;
	private int positionY;
	
	public MapObject(){
		//@Description: constructor sets the MapObject to 1,1
		//@Tile Representation Terrain.SizeX = 4 & Terrain SizeY = 3
		//  X Axis ->
		//         0        1       2       3      
		//      +--------------------------------+
		//   0  |       |       |       |        | 
		//      +--------------------------------+
		//   1  |       |       |       |        |
		//      +--------------------------------+
		//   2  |       |       |       |        |
		//      +--------------------------------+
		//  ^
		//  Y Axis
		this.positionX = 0;
		this.positionY = 0;
	}
	
	public void setPosition(int x, int y){
		//@Description set the position of the MapObject in the tile screen
		//@Param x coordinate
		//@Param y coordinate
		//@Assumes x >= 0 && x < Terrain.sizeX 
		//@Assumes y >= 0 && y < Terrain.sizeY
		this.positionX = x;
		this.positionY = y;
	}
	public int getPositionX(){
		//@Description: get the X coordinate position of the MapObject
		//@Returns positionX
		return this.positionX;
	}
	public int getPositionY(){
		//@Description: get the Y coordinate position of the MapObject
		//@Returns positionY
		return this.positionY;
	}
	public boolean equals(MapObject mobj){
		
		return (mobj.getPositionX() == this.positionX && mobj.getPositionY() == this.positionY);
	}
	public String toString(){
		String to = "";
		to = "PositionX = " + this.positionX + " PositionY = " + this.positionY;
		
		return to;
	}



}
